package com.fliangyun.nsa.nsamanage.entities;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
 * @author Rain
 * @date 2023年05月28日
 * @description
 */
@Data
public class User implements UserDetails {
    private String id;
    private String name;
    private String mobile;
    private String password;
    private String photo;
    /**
     * 是否发送短信，0-否，1-是
     */
    private String smsFlag;
    private String keyId;
    private String keySecret;
    private String sign;
    private String templateCode;
    /**
     * 邮件
     */
    private String mail;

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getUsername() {
        return mobile;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
